package com.taotao.manager.controller;

import com.taotao.common.pojo.TaotaoResult;
import com.taotao.search.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SolrController {
    @Autowired
    private SearchService searchService;

    @RequestMapping("/index/importAll")
    @ResponseBody
    public TaotaoResult importAll() throws Exception{
        //引入服务，注入服务
        //调用mapper的方法，把商品信息导入索引库

        return searchService.importAllItems();
    }
}
